<template>
 <div id="home">
   <nav-bar class="home-nav"><div slot='center'>购物车</div></nav-bar>
   <home-swiper :banners="banners"/>
 </div>
</template>

<script>
import NavBar from 'components/common/navbar/NavBar'
import HomeSwiper from './childrenComps/HomeSwiper.vue'
import {getHomeMultidata} from 'network/home'


export default {
  name:'Home',
  components:{
    NavBar,
    HomeSwiper
  },
  data(){
    return{
      banners:[],
      recommends:[]
    }
  },
  created(){
    getHomeMultidata().then(res=>{
      this.banners=res.data.banner.list;
      this.recommends=res.data.recommend.list;
    })
  }
}
</script>

<style>
.home-nav{
  color: #fff;
  background-color: var(--color-tint);
}
</style>